<?php
if ($this->hasError()) :
	return;
endif;
$_act = $this->getAction()->getId();
if ($_act == 'create'):
	$this->pageTitle = '创建帐号';
else:
	$this->pageTitle = '更新帐号';
endif;
?>
<?php echo EHtml::beginForm();?>
<fieldset>
  <legend><?php echo $this->pageTitle;?></legend>
  <table class="post">
    <tbody>
      <tr>
        <td width="100"><?php echo EHtml::activeLabelEx($model,'username'); ?></td>
        <td>
          <?php echo EHtml::activeTextField($model, 'username')?>
        </td>
      </tr>
      <tr>
        <td><?php echo EHtml::activeLabelEx($model,'realname'); ?></td>
        <td><?php echo EHtml::activeTextField($model, 'realname')?></td>
      </tr>
      <tr>
        <td><?php echo EHtml::activeLabelEx($model,'admin_role_id'); ?></td>
        <td><?php echo EHtml::activeDropDownList($model, 'admin_role_id', $roles)?></td>
      </tr>
      <tr>
        <td><input type="submit" value="提交" /></td>
        <td></td>
      </tr>
    </tbody>
  </table>
</fieldset>
<?php echo EHtml::endForm();?>

